<template>
  <edu-page-tabs :tab-list="xTabs" />
</template>

<script>
import EduPageTabs from '@public/template/tabs/page_tabs.vue';
export default {
  components: {
    EduPageTabs
  },
  props: {
    courseId: {
      type: Number,
      required: true
    },
    tabs: {
      type: Array,
      default: () => {
        return [];
      }
    }
  },
  data() {
    return {
      defaultTabs: [
        {
          title: '登录配置',
          uri: '/system/config/login',
          meta: {
            permission: 'system.config.login'
          }
        },
        {
          title: '一键登录配置',
          uri: '/system/config/oneclick',
          meta: {
            permission: 'system.config.oneclick'
          }
        },
        {
          title: '微信小程序配置',
          uri: '/system/config/miniapp',
          meta: {
            permission: 'system.config.miniapp'
          }
        },
        {
          title: '微信公众号配置',
          uri: '/system/config/official',
          meta: {
            permission: 'system.config.official'
          }
        }
      ]
    };
  },
  computed: {
    xTabs() {
      return [...this.defaultTabs, ...this.tabs];
    }
  }
};
</script>
